const evn=require('../env/index.js')
const api=require('./api')
const fetch = require('./fetch')


//确定开发环境
let baseUrl=evn.devBaseUrl;
//如果接口需要token鉴权，获取token
let token=wx.getStorageSync('token');

//轮播请求函数
function banner(){
  return fetch(baseUrl+api.banner,'get',{})
}
//list列表函数
function list(obj){
  return fetch(baseUrl+api.list,'get',obj)
}

//校长首页列表函数
function xiaoZhangShouYe(obj){
  return fetch(baseUrl+api.xiaoZhangShouYe,'get',obj)
}

//校长投诉立项函数
function xiaoZhangTouSuLiXiang(obj){
  return fetch(baseUrl+api.xiaoZhangTouSuLiXiang,'get',obj)
}

//获取所有期数
function suoYouQiShu(obj){
  return fetch(baseUrl+api.suoYouQiShu,'get',obj)
}



  //就业指导首页
function jyzhiDaoShouYe(obj){
    return fetch(baseUrl+api.jyzhiDaoShouYe,'get',obj);
  }
  //上传
  function shangchuan(obj){
    return fetch(baseUrl+api.shangchuan,'post',obj);
  }
  //投诉处理
  function tschuLI(obj){
    return fetch(baseUrl+api.tschuLI,'post',obj);
  }

  //投诉立项
function zrTouSuLx(obj){
  return fetch(baseUrl+api.zrTouSuLx,'get',obj)
}



//分类接口函数

module.exports={
  banner,
  list,
  xiaoZhangShouYe,
  xiaoZhangTouSuLiXiang,
  suoYouQiShu,
  zrTouSuLx,
  jyzhiDaoShouYe,
  shangchuan,
  tschuLI
}
